//登录
function ajaxlogin(form1){			
	var obj=$("#"+form1);	
	if($(obj).data('lock'))return;							
	$(obj).data('lock', true);	
	$.getJSON(obj.attr('action'),obj.serialize(),function(result){			
		if(result.state==false){			
            mui.alert(result.msg);														
			$(obj).data('lock', false); 
			$("#auth_code_img").click();
			return false;
		}				
		location.href=result.url;		
	})
}
//confirm处理超级链接
function confirmget(url,cmsg){	
	var btnArray = ['否', '是'];
	mui.confirm(cmsg, '', btnArray, function(e) {
		if(e.index ==1){
		   location.href=url;	
		} 
	})			
}
//confirm处理超级链接
function confirmreload(cmsg){	
	var btnArray = ['否', '是'];
	mui.confirm(cmsg, '', btnArray, function(e) {
		if(e.index ==1){
			location.reload(true);	
		} 
	})			
}
//ajax处理超级链接
function ajaxget(url,cmsg){	
	var btnArray = ['否', '是'];
	mui.confirm(cmsg, '', btnArray, function(e) {
		if(e.index ==1){
			$.getJSON(url,function(result){
				if(result.status==false){
					layer.msg(result.msg);								
					return false;
				}
				layer.msg(result.msg);			
				setTimeout(function(){location.reload(true);},2000);
			})
		} 
	})			
}
//ajax提交表单内容
function ajaxpost(form1){	
	var obj=$("#"+form1);	
	if($(obj).data('lock'))return;							
	$(obj).data('lock', true);	
	$.post(obj.attr('action'),obj.serialize(),function(result){		
		if(result.state==false){			
			layer.msg(result.msg);
			$(obj).data('lock', false);  
			return false;
		}
		layer.msg(result.msg);			
		setTimeout(function(){location.reload(true);},2000);					
	},'json')
}
//ajax提交表单内容
function ajaxpostconfirm(form1,cmsg){
	var btnArray = ['否', '是'];
	mui.confirm(cmsg, '', btnArray, function(e) {
		if(e.index ==1){
			var obj=$("#"+form1);	
			if($(obj).data('lock'))return;							
			$(obj).data('lock', true);	
			$.post(obj.attr('action'),obj.serialize(),function(result){		
				if(result.state==false){			
					layer.msg(result.msg);
					$(obj).data('lock', false);  
					return false;
				}
				layer.msg(result.msg);			
				setTimeout(function(){location.reload(true);},2000);					
			},'json')
		} 
	})	
}